package com.mc.service.impl;

import com.mc.bean.Apply;
import com.mc.dao.ApplyDao;
import com.mc.dao.Impl.ApplyDaoImpl;
import com.mc.service.ApplyService;

import java.util.List;

/**
 * @author zh
 * 报名业务逻辑接口实现
 */
public class ApplyServiceImpl implements ApplyService {
    ApplyDao applyDao=new ApplyDaoImpl();
    @Override
    public List<Apply> findAll() {
        return applyDao.findAll();
    }

    @Override
    public Apply findByCode(int matchcode) {
        return applyDao.findByCode(matchcode);
    }

    @Override
    public List<Apply> findByMid(int mid) {
        return applyDao.findByMid(mid);
    }

    @Override
    public List<Apply> findByTeamId(int teamid) {
        return applyDao.findByTeamId(teamid);
    }

    @Override
    public boolean add(Apply apply) {
        return applyDao.add(apply)>0?true:false;
    }

    @Override
    public boolean delete(int matchcode) {
        return applyDao.delete(matchcode)>0?true:false;
    }

    @Override
    public boolean update(Apply apply) {
        return applyDao.update(apply)>0?true:false;
    }
}
